import axiosInstance from './config'

export const loginRequest = (data) => {
  return axiosInstance.post('/login', data)
}

export const getMenuListRequest = () => {
  return axiosInstance.get('/menus')
}

export const getUserListRequest = (query) => {
  return axiosInstance.get('/users', { params: query})
}

export const changeUserStateRequest = (uid, type) => {
  return axiosInstance.put(`/users/${uid}/state/${type}`)
}

export const createUserRequest = (data) => {
  return axiosInstance.post('/users', data)
}

export const deleteUserRequest = (id) => {
  return axiosInstance.delete(`/users/${id}`)
}